home *** CD-ROM | disk | FTP | other *** search
/ Wayzata's Best of Shareware for Macintosh / CD Line - Limited Edition Wayzata's Best of Shareware for Macintosh for MacWorld Exposition Milano 1994 (050594)(1994).iso / pc / utilitie / all_syst / cleanup_.02 / stack_-1.xml < prev   
Extensible Markup Language  |  1993-05-22  |  9KB  |  28 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.02</name>
  5.     <id>-1</id>
  6.     <cardCount>9</cardCount>
  7.     <cardID>2957</cardID>
  8.     <listID>5861</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>-- All Scripts written by Donald Hamp 1989on eset userlevel to 5edit script of this stackshow menubarend eon mouseupif the optionkey is down thenset userlevel to 5show menubarend ifend mouseupon helpmeget fpMenu(0,"Introduction,(-",¬¨"About the Default Format",¬¨"Keep text as is",¬¨"Format tables with tabs,Troubleshooting")put it into cardnameput "" into last character of cardnameput "" into last character of cardname-- put "set the name of this card to " & quote & cardname & quote into msggo to card cardname--else do last word of item 1 of itend helpmeOn scrollmenu1selectselect line¬¨round((((item 2 of the mouseloc)¬¨-(item two of the rect of the target-10))/15.8)+¬¨(the scroll of the target)/15.8)¬¨of targetend scrollmenu1selectOn closestackput "" into card field "info" of card "scan document"--Uncomment following if you want--domenu Compact Stackend closestackOn openstackgo to card "startup"wait for 1 secondgo to card "Startcleanup"put "" into card field "startdoc"put "" into card field "stopdoc"put return & return & " Use little hand to pull down CLEANUP menu"¬¨& return & return into card field "trace"set userlevel to 2movearrow 0hide msgend openstack--********************************** Paragraphs only fast ******on paraonlyglobal format,afilename,wfilename,Wordvar,thisline,nextline,x,¬¨numlinesput "ET" into tableflaganswer " Cleanup and save..." with¬¨"Cancel" or "Only Tables" or "Whole Doc"if it = "Cancel" thenexit to Hypercardelsepop cardend ifif it = "Only Tables" thenput "TO" into tableflagend ifshow msg at 0,150put "Document Cleanup starting --Stop with apple period keys" into msghide card field "trace"open file wfilenamerepeat with x = 1 to numlinesmovearrow xput line x of wordvar into thislineput line (x+1) of wordvar into nextlineif word 1 of thisline = "**tablestart**" thenwrite return to file wfilenameput "table" into formatput "" into word 1 of thislineend ifif format = "table" thenformattablenext repeatend ifif tableflag = "TO" then next repeatif word 1 of thisline = "***As-is*Stop***" thenput "reset" into formatput "" into word 1 of thislineend ifif format = "grav" thenwrite thisline & return to file wfilenamenext repeatend ifif word 1 of thisline ="" thenwrite return to file wfilenamenext repeatend ifif word 1 of thisline = "***As-is*Start***" thenput "grav" into formatput "" into word 1 of thislinewrite thisline & return to file wfilenamenext repeatend ifif format = "paragraph" thenfixparanext repeatend ifif format = "reset" and word 1 of thisline <> "" thenif word 1 of nextline ="" thenwrite thisline & return to file wfilenamenext repeatend ifif word 1 of nextline <>"" thenput "paragraph" into formatfixparanext repeatend ifend ifend repeatend paraonly--END ************************* PRAGRAPHS ONLY-- **************************** FORMAT TABLE PROCEDURE *********on formattableglobal format,wfilename,Wordvar,thisline,nextline,xput "" into outlineif character 1 of thisline = " " thenleftjustifyend ifif last character of thisline = " " thencleaverightbend ifif last word of thisline = "**tablestop**" thenput "" into last word of line x of wordvarput "reset" into formatput "" into last word of thislineend ifput the number of characters in thisline into charnumput "yes" into puttabrepeat with y = 1 to charnumif character y of thisline <> " " thenput "no" into puttabput character y of thisline after outlinenext repeatend ifif character y of thisline = " " and character y+1¬¨of thisline = " " and puttab = "no" then--write tab to file wfilenameput tab after outlineput "yes" into puttabnext repeatend ifif character y of thisline = " " and character y+1¬¨of thisline <> " " and puttab = "no" thenput character y of thisline after outlinenext repeatend ifend repeatwrite outline & return to file wfilenameend formattable--************************** Fix Paragraphs subroutine **********on fixparaglobal format,afilename,wfilename,Wordvar,thisline,nextline,xif character 1 of thisline = " " thenleftjustifyend ifif last character of thisline = " " thencleaverightbend ifput last character of thisline into lastcharacterif lastcharacter = "-" then  put "" into last character of thislinewrite thisline to file wfilenameif  nextline = "" thenwrite return to file wfilenameput "reset" into formatend ifif lastcharacter = "." then write "  "  to file wfilenameif lastcharacter <> "-" and lastcharacter <> "." thenwrite " "  to file wfilenameend if--if nextline <> "" then--if character 1 of nextline = " " then-- repeat until character 1 of nextline <> " "--  delete character 1 of nextline-- end repeat--end if -- end of character1 nexline--end if--if word 1 of nextline = "" thenend fixparaon setflagsglobal format,afilename,wfilename,Wordvar,thisline,nextline,x,¬¨numlines,doctype,tablenum--hide msgput 1 into tablenumput "" into wfilenameput "" into wordvarput "reset" into formatput "tabpara" into doctypeput 0 into numLinesmovearrow 0end setflagson openFileglobal numlines,afilename,wfilename,wordvar,doctype,¬¨linesstart, linesstop,pixperline,shortfilenameput "" into card field "trace"put FileName("TEXT") into afilenameput the number of chars in afilename into afilenumput afilename & " Fixed" into wfilenameput 1 into startcharrepeat with n = afilenum down to 1if character n of afilename = ":" thenput n into startcharexit repeatend ifend repeatput char (startchar+1) to afilenum of afilename ¬¨into shortfilenameput shortfilename into card field "startdoc"put char (startchar+1) to (afilenum + 6) of wfilename ¬¨into card field "stopdoc"if afilename = "" then exit to Hypercardput return & return & return & "Make sure that the following files:"¬¨& return & " ==> " & shortfilename & return¬¨& " ==> " & shortfilename & " Fixed" & return¬¨& "are NOT open in another application, like MS WORD"¬¨into card field "trace"open file afilenameclose file afilenameopen file wfilenameclose file wfilenameopen file afilenameshow card field "trace"wait for 3 secondsput 1 into linesstartput 300 into linesstopRepeatRead from file afilename for 16384if it is empty then exit repeatput it after wordvarEnd repeatput the number of lines in wordvar into numLinesput 332/numLines into pixperlinego to card "scan document"click at the loc of card button "messages"put "Select text for special format, Note Cleanup menu" into¬¨card field "messages"put line linesstart to linesstop of wordvar into¬¨line 1 to 300 of card field "info"close file afilenameend openFileon leftjustifyglobal thislinerepeat until character 1 of thisline <> " "delete character 1 of thislineend repeatend leftjustifyon cleaverightbglobal thislinerepeat until last character of thisline <> " "delete last character of thislineend repeatend cleaverightbon movearrow xglobal pixperlineshow card button id 11 at¬¨trunc(82 + x*pixperline),287end movearrowon finishcleanupglobal wfilename,shortfilenamehide msgclose file wfilenameput "" into card field "startdoc"put "" into card field "stopdoc"put return & return & "Cleanup finished.  Edit document: " & return¬¨& shortfilename & " Fixed " & return & "with word processor" ¬¨into card field "trace"show card field "trace"movearrow 0end finishcleanup</script>
  17.     <background id="2642" file="background_2642.xml" name="" />
  18.     <card id="2957" file="card_2957.xml" marked="false" name="StartCleanup" owner="2642" />
  19.     <card id="4770" file="card_4770.xml" marked="false" name="" owner="2642" />
  20.     <card id="4216" file="card_4216.xml" marked="false" name="startup" owner="2642" />
  21.     <card id="4369" file="card_4369.xml" marked="false" name="Introduction" owner="2642" />
  22.     <card id="5165" file="card_5165.xml" marked="false" name="Troubleshooting" owner="2642" />
  23.     <card id="3311" file="card_3311.xml" marked="false" name="Keep text as is" owner="2642" />
  24.     <card id="2193" file="card_2193.xml" marked="false" name="Format tables with tabs" owner="2642" />
  25.     <card id="2395" file="card_2395.xml" marked="false" name="About the Default Format" owner="2642" />
  26.     <card id="3626" file="card_3626.xml" marked="false" name="Scan Document" owner="2642" />
  27. </stack>
  28.